package org.x.yuenovel.exception;

import org.springframework.util.StringUtils;
import org.x.yuenovel.enums.ResultCodeEnum;

/**
 * @Author Ning Meng
 * @Date 2022/4/22 10:40
 **/

public class ApiExceptionAsserts {

    public static void hasText(String text, ResultCodeEnum errorCode) {
        if (!StringUtils.hasText(text)) {
            throw new ApiException(errorCode);
        }
    }
}
